Open Bug 1820150 Opened 2 years ago

Share more code between browser-test.js and SimpleTest.js test runner frameworks for browser/plain mochitests

Categories

(Testing :: Mochitest, task)

Default
Desktop
All
task

Tracking

(Not tracked)

People

(Reporter: Gijs, Unassigned)

Details

This annoyed me before in creating add_setup which required 3 implementations (xpcshell, browser mochitests, plain mochitests - the latter of which I was too lazy to write so Serg did it in bug 1776589 when it bit password manager tests :-( ). Will pointed it out again in https://phabricator.services.mozilla.com/D171458#inline-946687 . Vaguely related is also bug 1736467 - SimpleTest is exposed into browser mochitests but many of its methods will not actually work because they expect to be called in plain mochitests and don't talk to the browser-test.js framework.

We should really share more code between our test frameworks. At this point we have the tools (eslint, jscodeshift) to automatically transform tests to be more similar to each other, and hopefully we can make use of that to accomplish some of this...

You need to log in before you can comment on or make changes to this bug.